AnalyticsTracker
Track business analytics statistics about visits to your site, such as:
- how often content is viewed
- how many site visitors viewed for first time, and how many returned
- the most popular referral pages
The data recorded by this server control is used by the Most Popular and Trends widgets' Most Viewed category. See also: Analyzing Websites
The data recorded is also used by the Classic Analytics Reports, available from the Ektron Workarea > Reports > CMS Site Analytics section.
IMPORTANT: Your site license key must support Analytics. You must also set the control's enableanalytics
property to true
or set the enableanalytics
property to ConfigSpecified
, and the enableAnalytics
key in your web.config
file to true
Use the ContentIdsList, DefaultContentID, and the DynamicParameter propertiesto determine which content items are viewed when a site visitor browses to a page that contains the control. The properties are additive; that is, they can be used together.
If you want to track your entire site, place an AnalyticsTracker server control on your master pages on your site templates, and use the DynamicParameter
property.
Inserting the AnalyticsTracker server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the AnalyticsTracker server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:AnalyticsTracker ID="AnalyticsTracker1" runat="server" />
- Click on
AnalyticsTracker
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
AnalyticsTracker properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- ContentIdsList (String)
Enter a comma-separated list of content IDs to be tracked. The DefaultContentId and the dynamicParameter are also tracked. See also: Analyzing Websites
- DefaultContentID (Long)
The ID of a content block being tracked by this server control. It typically would be the content directly above the AnalyticsTracker if no other content block is identified, or is not available. If you don’t know the ID number of the content block, use the CMS Explorer to browse to it.See also: Browsing your Ektron site using CMS Explorer
- DoInitFill (Boolean)
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
- DynamicParameter (String)
To make this control dynamic, select id. When you do, this server control is attached to the content block passed as a URL parameter.
- Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.